package com.xin.springcloudconsumer.feign;

import com.xin.springcloudconsumer.dto.PageResult;
import com.xin.springcloudconsumer.dto.UserDTO;
import com.xin.springcloudconsumer.form.MyfriendForm;
import com.xin.springcloudconsumer.vo.ResultPage;
import com.xin.springcloudconsumer.vo.ResultVO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PageableDefault;
import org.springframework.web.bind.annotation.*;

@FeignClient("springcloud-user")
@RequestMapping("/friend")
public interface FriendFeign {

    /**
     * 创建好友关系
     * @param uid
     * @param fid
     * @return
     */
    @PostMapping("/create")
    public ResultVO create(@RequestParam(name = "uid",defaultValue = "")String uid,
                           @RequestParam(name = "fid",defaultValue = "")String fid);

    /**
     * 删除好友关系
     * @param uid
     * @param fid
     * @return
     */
    @GetMapping("/delete")
    public ResultVO delete(@RequestParam(name = "uid",defaultValue = "")String uid,
                           @RequestParam(name = "fid",defaultValue = "")String fid);

    /**
     * 查询好友列表
     * @param uid
     * @param
     * @return
     */
    @GetMapping("/findMyFriendList")
    public ResultPage findMyFriendList(@RequestParam(name = "uid",defaultValue = "")String uid,
                                       @RequestParam(name = "page",defaultValue = "")Integer page,
                                       @RequestParam(name = "size",defaultValue = "")Integer size);



    /**
     * 是否为好友关系
     * @param uid
     * @param fid
     * @return
     */
    @GetMapping("/findFriendShip")
    public ResultVO findFriendShip(@RequestParam(name = "uid",defaultValue = "") String uid,
                                   @RequestParam(name = "fid",defaultValue = "") String fid);




}
